<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>在线充值</title>
    <link rel="stylesheet" type="text/css" href="../../../../css/aui/aui.css" />
    <style>
        .tongyi {
            text-align: left !important;
            padding-left: 0.75rem;
            font-size: 0.7rem;
        }

        .aui-bar-nav {
            background: #0689FB;
        }

        .aui-radio {
            width: 0.9rem;
            height: 0.9rem;
        }

        #footer {
            border-top: 1px solid #eee;
            box-sizing: border-box;
        }
    </style>
</head>

<body>
    <header class="aui-bar aui-bar-nav" id="header">
        <div class="aui-pull-left aui-btn">
            <span class="aui-iconfont aui-icon-left" onclick="close_w()"></span>
        </div>
        <div class="aui-title">在线充值</div>
    </header>
    <footer class="aui-bar aui-bar-tab" id="footer">
        <div class="aui-bar-tab-item aui-bg-danger aui-text-white" @click="pay()" tapmode>立即支付</div>
    </footer>

</body>
<script src="../../../../script/api.js" charset="utf-8"></script>
<script src="../../../../script/common/jquery-3.3.1.min.js" charset="utf-8"></script>
<script src="../../../../script/common/common.js" charset="utf-8"></script>
<script src="../../../../script/common/config.js" charset="utf-8"></script>
<script src="../../../../script/common/vue.min.js" charset="utf-8"></script>
<script>
    apiready = function() {
        api.parseTapmode();
        vm.init();
    }

    var vm = new Vue({
        el: "#footer",
        data: {
            tongyi: true,
        },
        methods: {
            init() {
                this.openFrame();
            },
            pay() {

                if (this.tongyi) {
                    // 执行子页面脚本
                    api.execScript({
                        name: api.winName,
                        frameName: 'online_pay_frm',
                        script: 'vm.pay()'
                    });
                } else {
                    $toast("请阅读并同意服务协议");
                }

            },
            openFrame() {
                var name = "online_pay_frm";
                var url = "./online_pay_frm.html";
                open_f(name, url, api.pageParam);
            },
            service_agreement() {
                var name = 'arc_arc_win';
                var url = '../../arc/arc_arc_win.html';
                var pageParam = {
                    title: '服务协议',
                    url: Config.api.NewsMemberTreaty
                };
                open_w(name, url, pageParam);
            }
        }
    });
</script>

</html>
